package model

import (
	"gorm.io/gorm"
	"time"
)

type Subscribes struct {
	Id        uint           `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	AudioId   uint           `gorm:"column:audio_id;type:bigint UNSIGNED;not null;default:0;" json:"audio_id"`
	Status    uint           `gorm:"column:status;type:bigint UNSIGNED;comment:1:订阅;not null;default:1;" json:"status"` // 1:订阅
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (s *Subscribes) TableName() string {
	return "subscribes"
}
